<!--这个页面是共享的,所有页面都要引入这个页面-->
<nav class="navbar navbar-inverse navbar-fixed-top">
    <div class="container">
        <div class="navbar-header">
            <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="#">web1703班级留言本</a>
        </div>
        <div id="navbar" class="navbar-collapse collapse">
            <ul class="nav navbar-nav">
                <li <%if(active=="index"){%>class="active"<%}%>><a href="/message">全部留言 <span class="sr-only">(current)</span></a></li>
                <li><a href="/message">我的留言本</a></li>
            </ul>
            <% if(!login){%>
            <ul class="nav navbar-nav navbar-right">
                <li <%if(active=="regist"){%>class="active"<%}%>><a href="/regist">注册</a></li>
                <li <%if(active=="login"){%>class="active"<%}%>><a href="/login">登录</a></li>
            </ul>
            <%}else{%>
            <ul class="nav navbar-nav navbar-right">
                <li><a>欢迎你:<%=username%></a></li>
                <li><a href="/quit">退出</a></li>
            </ul>
            <%}%>
        </div><!--/.navbar-collapse -->
    </div>
</nav>